<?php
/**
 * signPush.php
 *
 * @author camfee <camfee@foxmail.com>
 * @date   17-9-18 下午4:38
 *
 */

define("SITE_AUTH", 'recom-push-sign');

require '../../../common.inc.php';

use Mobile\RecomData;

class signPush extends \lib\core\Action
{
    public function doDefault()
    {
        if (!empty($_POST['msg'])) {
            RecomData::setData(RecomData::APP_SIGN_PUSH_MSG, ['Msg' => trim($_POST['msg'])]);
        }
        $msg = (string)RecomData::getData(RecomData::APP_SIGN_PUSH_MSG)[RecomData::APP_SIGN_PUSH_MSG]['Msg'];

        $smarty = $this->app->page();
        $smarty->value('msg', $msg);

        $smarty->output('recom/sign_push.tpl');
    }
}

$app->run();